package com.chat.system.service;

import com.chat.system.entity.dto.ChatFriendDTO;
import com.chat.system.entity.dto.ChatRecordDTO;
import com.chat.system.entity.dto.ChatUserDTO;
import com.chat.system.entity.dto.LatelyChatFriendDTO;
import com.chat.system.entity.po.ChatUser;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author czh
 * @since 2023-10-27
 */
public interface IChatUserService extends IService<ChatUser> {

    List<ChatUserDTO> listChatUsers(String userName,String currentUserName);

    void beginNewChat(String relationshipID, String message);


    List<LatelyChatFriendDTO> getLatelyFriendList(String currentUserName);

    Map<String, Map<String ,Object>> getLatelyChatRecords(String currentUserName);

    void sendMessage(ChatRecordDTO chatRecordDTO);

    boolean checkOnline(String friendName);

    void videoInvite(String friendName);

    void videoInviteConfirm(String friendName, boolean confirm);

    void stopVideo(String friendName);

    ChatRecordDTO preHandleIMG(ChatRecordDTO chatRecordDTO);

    long getTotalNumOfLatelyChatRecord(String currentUserName);

    List<ChatRecordDTO> fetchChatRecords(String friendShipId, Long current, Long total);
}
